package com.contract.spirit.ui.main.my

import com.contract.commonlib.util.ext.setClickAlpha
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.contract.spirit.R
import com.contract.spirit.bean.entity.MenuInfo
import com.contract.spirit.databinding.AdapterMyMenuItemBinding

/**
 * @author: witness
 * created: 2021/9/24
 * desc:
 */
class MenuAdapter : BaseQuickAdapter<MenuInfo, BaseDataBindingHolder<AdapterMyMenuItemBinding>>(
    R.layout.adapter_my_menu_item,
    ArrayList()
) {
    override fun convert(holder: BaseDataBindingHolder<AdapterMyMenuItemBinding>, item: MenuInfo) {
        val dataBinding = holder.dataBinding;
        dataBinding?.menuInfo = item
        setClickAlpha(dataBinding?.vgParent)
    }
}